package com.chenu.gamscriptman.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @author flyan
 * date 2019-12-26
 * @function 某个用户的通知，存放在数据库中保证下次登录也能看得到。
 */
@Data
@Accessors(chain = true)
@TableName(value = "notify")
public class Notify {

    @TableId(type = IdType.AUTO, value = "id")
    private Long id;

    private String text;        /* 通知数据 */
    @TableField(exist = false)
    public static final int TEXT_LENGTH = 128;  /* 通知最大长度 */

    @TableField(value = "user_fk")
    private Long userFK;        /* 用户外键 */

    /* 外键映射 */
    @TableField(exist = false)
    private User user;

}
